<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>放大镜</title>
    <script src="./index.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .container{
            position: relative;
            width: 300px;
            height: 300px;
            overflow: hidden;
            float: left;
            margin-right: 20px;
            cursor: pointer;
        }

        .container>img{
            width: 100%;
            display: block;
            pointer-events: none;
        }
        
        .box {
            position: absolute;
            top: 0;
            left: 0;
            background-color: rgb(255, 255, 255);
            opacity: 0.5;
            pointer-events: none;
            display: none;
        }

        .show{
            width: 500px;
            height: 500px;
            overflow: hidden;
            box-sizing: border-box;
            pointer-events: none;
            position: absolute;
            left: 130%;
            top: 0;
        }
        .show>img{
            position: absolute;
            top: 0;
            left: 0;
            display: block;
        }
    </style>
</head>

<body>
    <div class="container">
        <img src="./images/p1.jpg" alt="">
        <div class="box"></div>
        <div class="show">
            <img src="./images/p1.jpg" alt="">
        </div>
    </div>
    
</body>
</html>